﻿package mortal.game.view.copy.wine.view
{
    import com.mui.controls.*;
    import flash.events.*;
    import mortal.component.gconst.*;
    import mortal.game.manager.*;
    import mortal.game.view.common.*;

    public class WinePartyMoraSpr extends GSprite
    {
        private var _bg:GImageBitmap;
        private var _moraType:int;
        private var _moraName:String;

        public function WinePartyMoraSpr()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.mouseEnabled = true;
            this._bg = UIFactory.gImageBitmap("", 0, 0, this);
            this.filters = [FilterConst.colorFilter2];
            this.configEventListener(MouseEvent.MOUSE_OVER, this.onOverHandler);
            this.configEventListener(MouseEvent.MOUSE_OUT, this.onOutHandler);
            return;
        }// end function

        public function set bgName(param1:String) : void
        {
            this._bg.imgUrl = param1;
            return;
        }// end function

        public function set isSelect(param1:Boolean) : void
        {
            if (param1)
            {
                this.filters = [];
            }
            else
            {
                this.filters = [FilterConst.colorFilter2];
            }
            return;
        }// end function

        private function onOverHandler(event:MouseEvent) : void
        {
            CursorManager.showCursor(CursorManager.BUTTON);
            return;
        }// end function

        private function onOutHandler(event:MouseEvent) : void
        {
            CursorManager.hideFromButton();
            return;
        }// end function

        public function set moraType(param1:int) : void
        {
            this._moraType = param1;
            return;
        }// end function

        public function get moraType() : int
        {
            return this._moraType;
        }// end function

        public function set moraName(param1:String) : void
        {
            this._moraName = param1;
            return;
        }// end function

        public function get moraName() : String
        {
            return this._moraName;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            this._bg.dispose();
            this._bg = null;
            this._moraType = 0;
            return;
        }// end function

    }
}
